package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.model.user.VipServiceConfig;
import com.atguigu.tingshu.user.client.impl.UserInfoDegradeFeignClient;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-user", fallback = UserInfoDegradeFeignClient.class,path = "/api/userInfo/rpc")
public interface UserInfoFeignClient {
    @GetMapping("/getUserInfoByUserId/{userId}")
    Result<UserInfoVo> getUserInfoByUserId(@PathVariable("userId") Long userId);

    @GetMapping("/getUserPaidAlbumTrackList/{albumId}/{userId}")
    Result<Map<Long, String>> getUserPaidAlbumTrackList(@PathVariable("albumId") Long albumId, @PathVariable("userId") Long userId);

    @GetMapping("/getUserPaidAlbum/{albumId}/{userId}")
    Result<Boolean> getUserPaidAlbum(@PathVariable("albumId") Long albumId, @PathVariable("userId") Long userId);

    @GetMapping("/getVipServiceConfig/{itemId}")
    Result<VipServiceConfig> getVipServiceConfig(@PathVariable("itemId") Long itemId);
}